// GenerateInventory generates the distribution inventory for aws-shareami resource.
GenerateInventory generates the distribution inventory for aws-shareami resource.
// GenerateInventory generates the distribution inventory for aws - shareami resource .
func (r *Resource) GenerateInventory() ([]byte, error) {
	type inventoryRecord struct {
		ResourceName *string `yaml:"resourceName"`
		Output       Record  `yaml:"output"`
	}
	ir := inventoryRecord{
		ResourceName: r.Name,
		Output:       r.Record,
	}
	bs, err := yaml.Marshal([]inventoryRecord{ir})
	if err != nil {
		return nil, err
	}
	return bs, nil
}
func ( r * Resource ) GenerateInventory ( ) ( [ ] byte , error ) { type inventoryRecord struct { ResourceName * string `yaml:"resourceName"` Output Record `yaml:"output"` } ir := inventoryRecord { ResourceName : r . Name , Output : r . Record , } bs , err := yaml . Marshal ( [ ] inventoryRecord { ir } ) if err != nil { return nil , err } return bs , nil }
GenerateInventory generates the distribution inventory for aws-shareami resource.
GenerateInventory generates the distribution inventory for aws - shareami resource .