Sie sind auf Seite 1von 4

TASK SUMMARY

I will need create table commands generated for mysql database for the below Tables.

Please refer to the example link below for which I have already generated a file and provided you with
an example.

COMPLETED EXAMPLE

Completed Example for user, group and group_user table

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#createUser-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#createGroup-property

CREATE TABLE user (UserName varchar(30) NOT NULL, PasswordLastUsed datetime, CreateDate
datetime NOT NULL, UserId varchar(30) NOT NULL, Path varchar(256) NOT NULL, Arn varchar(256) NOT
NULL, PRIMARY KEY (UserId), CONSTRAINT UserName UNIQUE (UserName), CONSTRAINT UserId
UNIQUE (UserId), CONSTRAINT Arn UNIQUE (Arn)) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE group (GroupName varchar(30) NOT NULL, CreateDate datetime NOT NULL, GroupId
varchar(30) NOT NULL, Path varchar(256) NOT NULL, Arn varchar(256) NOT NULL, PRIMARY KEY
(GroupId), CONSTRAINT GroupId UNIQUE (GroupId), CONSTRAINT Arn UNIQUE (Arn)) ENGINE=InnoDB
DEFAULT CHARSET=latin1;

TO DO BELOW (Use similar logic as above)

For e.g

The datatypes should match the datatype returned by the function

1. Policy Table

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#getPolicy-property

The data that will be returned will be the data object that is returned when calling the getPolicy.

The tablename will be Policy (the get removed for the function getPolicy) and the fields will be
PolicyName, PolicyId, Arn .. etc.

data (Object)

the de-serialized data returned from the request. Set to null if a request error
occurs. The data object has the following properties:

Policy (map)

A structure containing details about the policy.


PolicyName (String)

The friendly name (not ARN) identifying the policy.

PolicyId (String)

The stable and unique string identifying the policy.

For more information about IDs, see IAM Identifiers in the Using IAM guide.

Arn (String)

The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.

For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service
Namespaces in the AWS General Reference.

Path (String)

The path to the policy.

For more information about paths, see IAM Identifiers in the Using IAM guide.

DefaultVersionId (String)

The identifier for the version of the policy that is set as the default version.

AttachmentCount (Integer)

The number of entities (users, groups, and roles) that the policy is attached to.

IsAttachable (Boolean)

Specifies whether the policy can be attached to an IAM user, group, or role.

Description (String)

A friendly description of the policy.

This element is included in the response to the GetPolicy operation. It is not included in the response
to the ListPolicies operation.

CreateDate (Date)

The date and time, in ISO 8601 date-time format, when the policy was created.

UpdateDate (Date)

The date and time, in ISO 8601 date-time format, when the policy was last updated.

When a policy has only one version, this field contains the date and time when the policy was created.
When a policy has more than one version, this field contains the date and time when the most recent
policy version was created.
The other tables that I need created will be for the data returned by the following functions.

2. AccessKeyLastUsed

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#getAccessKeyLastUsed-
property

Table Name AccessKeyLastUsed and the fields will be UserName, LastUsedDate, ServiceName and
Region etc

3. All Others

Use the same logic as above and provide me the create tables for the data that you get from the
following links.

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#getGroupPolicy-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#getInstanceProfile-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#getLoginProfile-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#getRole-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#getRolePolicy-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#getSAMLProvider-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#getServerCertificate-
property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#getSSHPublicKey-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#getUserPolicy-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#listAccessKeys-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#listAttachedGroupPolicies-
property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#listAttachedRolePolicies-
property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#listAttachedUserPolicies-
property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#listEntitiesForPolicy-
property
http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#listGroupPolicies-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#listInstanceProfiles-
property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#listInstanceProfilesForRole-
property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#listMFADevices-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#listPolicies-property

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/IAM.html#listSAMLProviders-property

Das könnte Ihnen auch gefallen